<!doctype html>
<html>
<head>
    <meta charset=utf-8>
    <title></title>
    <meta name="robots" content="noindex,nofollow">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="<?=Web_Path?>packs/layui/css/layui.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/font.css">
    <link rel="stylesheet" href="<?=Web_Path?>packs/admin/css/style.css">
    <script src="<?=Web_Path?>packs/js/jquery.min.js"></script>
    <script src="<?=Web_Path?>packs/layui/layui.js"></script>
    <script src="<?=Web_Path?>packs/admin/js/cscms.js"></script>
</head>
<body>
    <span class="layui-breadcrumb" >
        <a ><cite><i class="fa fa-map-marker"></i><?=L('tpl_ul_01')?></cite></a>
        <a href="<?=site_url('user')?>"><?=L('tpl_ul_02')?></a>
        <a href="<?=site_url('user/zu')?>"><?=L('tpl_ul_03')?></a>
    </span>
    <form class="layui-form" action="<?=site_url('user/level_del')?>" method="post">
        <table class="layui-table" style="width: 99.7%">
            <colgroup>
                <col width="40">
            </colgroup>
            <thead>
                <tr>
                    <th><?=L('tpl_ul_04')?></th>
                    <th class="phide"><?=L('tpl_ul_05')?></th>
                    <th class="phide"><?=L('tpl_ul_06')?></th>
                    <th><?=L('tpl_ul_07')?></th>
                    <th><?=L('tpl_ul_08')?></th>
                    <th class="phide"><?=L('tpl_ul_09')?></th>
                    <th><?=L('tpl_ul_10')?></th>
                    <th><?=L('tpl_ul_11')?></th>
                </tr>
            </thead>
            <tbody>
            <?php
                if(empty($userlevel)) echo '<tr><td align="center" height="50" colspan="8">'.L('tpl_ul_17').'</td></tr>';
                foreach ($userlevel as $row) {
                    //会员数量
                    $usernums=$this->db->query("SELECT id FROM ".CS_SqlPrefix."user where level=".$row->id."")->num_rows();
                    $xuan=($row->id>1)?'<input class="xuan" name="id['.$row->id.']" type="checkbox" value="'.$row->id.'" />':'--';
                    echo '
                    <tr id="row_'.$row->id.'">
                    <td>'.$xuan.'</td>
                    <td class="phide">'.$row->id.'</td>
                    <td class="phide"><input style="width:30px;text-align: center;" zuid="'.$row->id.'" name="xid['.$row->id.']" onkeyup="this.value=this.value.replace(/[^0-9]/g,\'\')" value="'.$row->xid.'" class="sort" /></td>
                    <td>'.$row->name.'</td>
                    <td>'.get_stars($row->stars).'</td>
                    <td class="phide">'.$usernums.'</td>
                    <td>'.$row->jinyan.'</td>
                    <td><a class="layui-btn layui-btn-mini" href="javascript:cscms.get_open(\''.site_url('user/level_edit').'?id='.$row->id.'\',\''.L('tpl_ul_12').'\',\'500px\',\'360px\')">修改</a>
                    </tr> ';
                }
            ?>
            </tbody>
        </table>
        <div class="more_func">
            <a class="layui-btn layui-btn-primary layui-btn-small" href="javascript:cscms.select_all();"><i class="fa fa-check colorl" ></i><?=L('tpl_ul_13')?></a>
            <a class="layui-btn layui-btn-primary layui-btn-small" lay-submit lay-filter="del_pl"><i class="fa fa-close " style="color: red" ></i><?=L('tpl_ul_14')?></a>
            <a class="layui-btn layui-btn-primary layui-btn-small phide" href="javascript:cscms.sort_submit('<?=site_url('user/level_sort')?>');"><i class="fa fa-sort colorb"></i> <?=L('tpl_ul_15')?></a>
            <a class="layui-btn layui-btn-primary layui-btn-small" href="javascript:cscms.get_open('<?=site_url('user/level_edit')?>','<?=L('tpl_ul_16')?>','500px','360px')"><i class="fa fa-plus colorn"></i> <?=L('tpl_ul_16')?></a>
        </div>
    </form>
    <div id="page">
        <div class="data_nums phide"><?=$page_data?></div>
        <div class="data_page"><?=$page_list?></div>
    </div>
    <script type="text/javascript">
        cscms.init();
    </script>
</body>
</html>


